package com.qf.springmvc02.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author nk
 * @date 2022/5/4 14:52
 */
@Data //set  get  hash  equals  toString
@Builder //生成一个对象的建造器
@NoArgsConstructor //无参构造方法
@AllArgsConstructor //全参构造方法
public class User {
    private Integer id;

    private String name;
//    @JsonIgnore//密码不参与序列化
    private String password;

    private String sex;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date registTime;
}
